<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <title>客户信息</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/layui/css/layui.css" media="all">
    <script src="/layui/jquery-3.5.1.min.js"></script>
    <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
</head>

<body>

    <!--<blockquote class="layui-elem-quote layui-text">
        鉴于小伙伴的普遍反馈，先温馨提醒两个常见“问题”：1. <a href="/doc/base/faq.html#form" target="_blank">为什么select/checkbox/radio没显示？</a> 2. <a href="/doc/modules/form.html#render" target="_blank">动态添加的表单元素如何更新？</a>
    </blockquote>-->
    <!--<h3 th:text="${dictionary.getvalue()}"></h3>-->
   <!-- <option th:each="suppiler:${suppilers}" th:value="${suppiler.id}" th:text="${suppiler.name}"></option>-->
    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
        <legend>客户信息演示</legend>
    </fieldset>

    <form class="layui-form" action="/customerInformation/enterpriseBasicInformation" enctype="multipart/form-data" method="post">
        <div class="layui-form-item">
            <label  class="layui-form-label">企业名称</label>
            <div class="layui-input-inline">
             <!--   lay-verify="required"-->
                <input value="美团ffsdf" type="text" name="name"  placeholder="请输入" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label  class="layui-form-label">企业简称</label>
            <div class="layui-input-inline">
                <input value="美团" type="text" name="abbreviation"  placeholder="请输入" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label  class="layui-form-label">税号</label>
            <div class="layui-input-inline">
                <input value="324324" type="text" name="dutyParagraph"  placeholder="请输入" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-inline">
            <labeld  class="layui-form-label">类型</labeld>
            <div class="layui-input-inline">
                <select id="type1" name="dictionaryA.id"  lay-search="">
                  <!--  <option value="">直接选择或搜索选择</option>-->
                    <option th:each="dictionary:${dictionaryList}" th:value="${dictionary.id}" th:text="${dictionary.value}"></option>-->
                   <!-- <option value="1">layer</option>
                    <option value="2">form</option>-->
                </select>
            </div>
        </div>

        <div class="layui-form-item">
            <label  class="layui-form-label">公司地址</label>
            <div class="layui-input-inline">
                <input value="山东德州" type="text" name="address"  placeholder="请输入" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">法定代表人</label>
            <div class="layui-input-inline">
                <input value="刘佳辉" type="text" name="legalRepresentative"  placeholder="请输入" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">注册金额</label>
            <div class="layui-input-inline">
                <input value="100000000" type="text" name="registeredAmount"  placeholder="请输入" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">注册币种</label>
            <div class="layui-input-inline">
                <select name="dictionaryB.id" lay-verify="required" lay-search="">
                    <!--  <option value="">直接选择或搜索选择</option>-->
                    <option th:each="dictionary1:${dictionaryList1}" th:value="${dictionary1.id}" th:text="${dictionary1.value}"></option>-->
                    <!-- <option value="1">layer</option>
                     <option value="2">form</option>-->
                </select>
            </div>
        </div>
        <br>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">营业日期</label>
                <div class="layui-input-block">
                    <input value="2015-5-12" type="text" name="createTime" id="date1" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">截止日期</label>
                <div class="layui-input-block">
                    <input value="2028-05-15" type="text" name="endTime" id="date" autocomplete="off" class="layui-input">
                </div>
            </div>

        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">经营范围</label>
            <div class="layui-input-block">
                <textarea  name="natureOfBusiness" placeholder="请输入内容" class="layui-textarea">1gdfgdg</textarea>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">登记机关</label>
            <div class="layui-input-inline">
                <input value="dsadsadasd" type="text" name="registrationAuthority"  placeholder="请输入" autocomplete="off" class="layui-input">
            </div>
        </div>
               <div class="layui-inline">
            <label class="layui-form-label">所有制信息</label>
            <div class="layui-input-inline">
                <select name="dictionaryC.id" lay-verify="required" lay-search="">
                    <!--  <option value="">直接选择或搜索选择</option>-->
                    <option th:each="dictionary2:${dictionaryList2}" th:value="${dictionary2.id}" th:text="${dictionary2.value}"></option>-->
                    <!-- <option value="1">layer</option>
                     <option value="2">form</option>-->
                </select>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">联系电话</label>
            <div class="layui-input-inline">
                <input value="155754565555" type="text" name="phone"  placeholder="请输入" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">传真号</label>
            <div class="layui-input-inline">
                <input value="1565555" type="text" name="fax"  placeholder="请输入" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">了解途径</label>
            <div class="layui-input-inline">
                <select name="dictionaryD.id" lay-verify="required" lay-search="">
                    <!--  <option value="">直接选择或搜索选择</option>-->
                    <option th:each="dictionary3:${dictionaryList3}" th:value="${dictionary3.id}" th:text="${dictionary3.value}"></option>-->
                    <!-- <option value="1">layer</option>
                     <option value="2">form</option>-->
                </select>
            </div>
        </div>
     <!--   <input value="营业执照" name="manage" type="button" class="layui-btn" id="test3"/><i class="layui-icon"></i>>
        <div style="margin-top: 10px;">
            <ins class="adsbygoogle" style="display:inline-block;width:970px;height:90px" data-ad-client="ca-pub-6111334333458862" data-ad-slot="3820120620"></ins>

        </div>-->
        <div class="layui-upload">
            <button style="margin-left:100px;" type="button" class="layui-btn layui-btn-normal" id="test8">选择文件</button>
            <button type="button" class="layui-btn" id="test9">开始上传</button>
        </div>
        <br>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <input type="submit" class="layui-btn" lay-submit="" lay-filter="demo1"/>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    </form>



    <script src="/layui/layui.js" charset="utf-8"></script>
    <!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
    <script>
    $(function () {
        $("#type1").change(function () {
        /*var t = $(".type").val();*/
        alert("1111");
        });
    });
    </script>
    <script>
        layui.use('upload', function() {
            var $ = layui.jquery
                , upload = layui.upload;
            //选完文件后不自动上传
            upload.render({
                elem: '#test8'
                ,url: 'http://localhost:8080/customerInformation/enterpriseBasicInformation' //改成您自己的上传接口
                ,auto: false
                ,accept: 'file'
                //,multiple: true
                ,bindAction: '#test9'
                ,done: function(res){
                    layer.msg('上传成功');
                    console.log(res)
                }
            });
        })
        layui.use(['form', 'layedit', 'laydate'], function() {
            var form = layui.form,
                layer = layui.layer,
                layedit = layui.layedit,
                laydate = layui.laydate;

            //日期
            laydate.render({
                elem: '#date'
            });
            laydate.render({
                elem: '#date1'
            });

            //创建一个编辑器
            var editIndex = layedit.build('LAY_demo_editor');

          /*  //自定义验证规则
            form.verify({
                title: function(value) {
                    if (value.length < 5) {
                        return '标题至少得5个字符啊';
                    }
                },
                pass: [
                    /^[\S]{6,12}$/, '密码必须6到12位，且不能出现空格'
                ],
                content: function(value) {
                    layedit.sync(editIndex);
                }
            });
*/
            //监听指定开关
         /*   form.on('switch(switchTest)', function(data) {
                layer.msg('开关checked：' + (this.checked ? 'true' : 'false'), {
                    offset: '6px'
                });
                layer.tips('温馨提示：请注意开关状态的文字可以随意定义，而不仅仅是ON|OFF', data.othis)
            });

            //监听提交
            form.on('submit(demo1)', function(data) {
                layer.alert(JSON.stringify(data.field), {
                    title: '最终的提交信息'
                })
                return false;
            });

            //表单赋值
            layui.$('#LAY-component-form-setval').on('click', function() {
                form.val('example', {
                    "username": "贤心" // "name": "value"
                        ,
                    "password": "123456",
                    "interest": 1,
                    "like[write]": true //复选框选中状态
                        ,
                    "close": true //开关状态
                        ,
                    "sex": "女",
                    "desc": "我爱 layui"
                });
            });*/

            //表单取值
            layui.$('#LAY-component-form-getval').on('click', function() {
                var data = form.val('example');
                alert(JSON.stringify(data));
            });

        });

    </script>

</body>

</html>
